import request from '@/utils/request'

// 获取所有分类列表
export function getclassificationList(params) {
  return request({
    url: '/categories',
    method: 'get',
    params
  })
}
// 新增
export function addclass(data) {
  return request({
    url: '/categories',
    method: 'post',
    data
  })
}
// 删除
export function deleclass(id) {
  return request({
    url: '/categories/' + id,
    method: 'delete'
  })
}
// id获取
export function getclass(id) {
  return request({
    url: '/categories/' + id,
    method: 'get'
  })
}

// 修改
export function putclass(data) {
  return request({
    url: '/categories/' + data.id,
    method: 'put',
    data
  })
}
// 获取总数
export function getcountclass(params) {
  return request({
    url: '/categories/count',
    method: 'get',
    params
  })
}
